home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / srcuc.zip / TYPES.H < prev    next >
C/C++ Source or Header  |  1991-01-23  |  7KB  |  198 lines

  1. /* -*-C-*-
  2.  
  3. $Header: /scheme/users/cph/microcode/RCS/types.h,v 9.32 1991/01/24 04:31:04 cph Exp $
  4.  
  5. Copyright (c) 1987-91 Massachusetts Institute of Technology
  6.  
  7. This material was developed by the Scheme project at the Massachusetts
  8. Institute of Technology, Department of Electrical Engineering and
  9. Computer Science.  Permission to copy this software, to redistribute
  10. it, and to use it for any purpose is granted, subject to the following
  11. restrictions and understandings.
  12.  
  13. 1. Any copy made of this software must include this copyright notice
  14. in full.
  15.  
  16. 2. Users of this software agree to make their best efforts (a) to
  17. return to the MIT Scheme project any improvements or extensions that
  18. they make, so that these may be included in future releases; and (b)
  19. to inform MIT of noteworthy uses of this software.
  20.  
  21. 3. All materials developed as a consequence of the use of this
  22. software shall duly acknowledge such use, in accordance with the usual
  23. standards of acknowledging credit in academic research.
  24.  
  25. 4. MIT has made no warrantee or representation that the operation of
  26. this software will be error-free, and MIT is under no obligation to
  27. provide any services, by way of maintenance, update, or otherwise.
  28.  
  29. 5. In conjunction with products arising from the use of this material,
  30. there shall be no use of the name of the Massachusetts Institute of
  31. Technology nor of any adaptation thereof in any advertising,
  32. promotional, or sales literature without prior written consent from
  33. MIT in each case. */
  34.  
  35. /* Type code definitions, numerical order */
  36.  
  37. /*    Name                Value    Previous Name */
  38.  
  39. #define TC_NULL                        0x00
  40. #define TC_LIST                0x01
  41. #define TC_CHARACTER            0x02
  42. #define    TC_SCODE_QUOTE                     0x03
  43. #define TC_PCOMB2            0x04
  44. #define TC_UNINTERNED_SYMBOL        0x05
  45. #define TC_BIG_FLONUM            0x06
  46. #define TC_COMBINATION_1        0x07
  47. #define TC_TRUE                0x08
  48. #define TC_EXTENDED_PROCEDURE        0x09
  49. #define TC_VECTOR            0x0A
  50. #define TC_RETURN_CODE             0x0B
  51. #define TC_COMBINATION_2        0x0C
  52. #define TC_MANIFEST_CLOSURE        0x0D
  53. #define TC_BIG_FIXNUM            0x0E
  54. #define TC_PROCEDURE            0x0F
  55. #define TC_ENTITY            0x10 /* PRIMITIVE_EXTERNAL */
  56. #define TC_DELAY            0x11
  57. #define TC_ENVIRONMENT            0x12
  58. #define TC_DELAYED            0x13
  59. #define TC_EXTENDED_LAMBDA        0x14
  60. #define TC_COMMENT            0x15
  61. #define TC_NON_MARKED_VECTOR        0x16
  62. #define TC_LAMBDA            0x17
  63. #define TC_PRIMITIVE            0x18
  64. #define TC_SEQUENCE_2            0x19
  65. #define TC_FIXNUM            0x1A
  66. #define TC_PCOMB1            0x1B
  67. #define TC_CONTROL_POINT        0x1C
  68. #define TC_INTERNED_SYMBOL        0x1D
  69. #define TC_CHARACTER_STRING        0x1E
  70. #define TC_ACCESS            0x1F
  71. #define TC_HUNK3_A            0x20 /* EXTENDED_FIXNUM */
  72. #define TC_DEFINITION            0x21
  73. #define TC_BROKEN_HEART            0x22
  74. #define TC_ASSIGNMENT            0x23
  75. #define TC_HUNK3_B            0x24
  76. #define TC_IN_PACKAGE            0x25
  77. #define TC_COMBINATION            0x26
  78. #define TC_MANIFEST_NM_VECTOR        0x27
  79. #define TC_COMPILED_ENTRY        0x28
  80. #define TC_LEXPR            0x29
  81. #define TC_PCOMB3              0x2A
  82. #define TC_MANIFEST_SPECIAL_NM_VECTOR    0x2B
  83. #define TC_VARIABLE            0x2C
  84. #define TC_THE_ENVIRONMENT        0x2D
  85. #define TC_FUTURE            0x2E
  86. #define TC_VECTOR_1B            0x2F
  87. #define TC_PCOMB0            0x30
  88. #define TC_VECTOR_16B            0x31
  89. #define TC_REFERENCE_TRAP        0x32 /* UNASSIGNED */
  90. #define TC_SEQUENCE_3            0x33
  91. #define TC_CONDITIONAL            0x34
  92. #define TC_DISJUNCTION            0x35
  93. #define TC_CELL                0x36
  94. #define TC_WEAK_CONS            0x37
  95. #define TC_QUAD                0x38 /* TRAP */
  96. #define TC_LINKAGE_SECTION        0x39
  97. #define TC_RATNUM            0x3A /* COMPILER_LINK */
  98. #define TC_STACK_ENVIRONMENT        0x3B
  99. #define TC_COMPLEX            0x3C
  100. #define TC_COMPILED_CODE_BLOCK        0x3D
  101. #define TC_RECORD            0x3E
  102.  
  103. /* If you add a new type, don't forget to update gccode.h, gctype.c,
  104.    and the type name table below. */
  105.  
  106. #define LAST_TYPE_CODE            0x3E
  107. #define MIN_TYPE_CODE_LENGTH        6
  108.  
  109. #ifdef TYPE_CODE_LENGTH
  110. #if (TYPE_CODE_LENGTH < MIN_TYPE_CODE_LENGTH)
  111. #include ";; inconsistency between object.h and types.h: MIN_TYPE_CODE_LENGTH"
  112. #endif
  113. #endif
  114.  
  115. #define TYPE_NAME_TABLE                            \
  116. {                                    \
  117.   /* 0x00 */                    "NULL",                    \
  118.   /* 0x01 */            "LIST",                    \
  119.   /* 0x02 */            "CHARACTER",                \
  120.   /* 0x03 */                     "SCODE-QUOTE",                \
  121.   /* 0x04 */            "PCOMB2",                \
  122.   /* 0x05 */            "UNINTERNED-SYMBOL",            \
  123.   /* 0x06 */            "BIG-FLONUM",                \
  124.   /* 0x07 */            "COMBINATION-1",            \
  125.   /* 0x08 */            "TRUE",                    \
  126.   /* 0x09 */            "EXTENDED-PROCEDURE",            \
  127.   /* 0x0A */            "VECTOR",                \
  128.   /* 0x0B */             "RETURN-CODE",                \
  129.   /* 0x0C */            "COMBINATION-2",            \
  130.   /* 0x0D */            "MANIFEST-CLOSURE",            \
  131.   /* 0x0E */            "BIG-FIXNUM",                \
  132.   /* 0x0F */            "PROCEDURE",                \
  133.   /* 0x10 */            "ENTITY",                \
  134.   /* 0x11 */            "DELAY",                \
  135.   /* 0x12 */            "ENVIRONMENT",                \
  136.   /* 0x13 */            "DELAYED",                \
  137.   /* 0x14 */            "EXTENDED-LAMBDA",            \
  138.   /* 0x15 */            "COMMENT",                \
  139.   /* 0x16 */            "NON-MARKED-VECTOR",            \
  140.   /* 0x17 */            "LAMBDA",                \
  141.   /* 0x18 */            "PRIMITIVE",                \
  142.   /* 0x19 */            "SEQUENCE-2",                \
  143.   /* 0x1A */            "FIXNUM",                \
  144.   /* 0x1B */            "PCOMB1",                \
  145.   /* 0x1C */            "CONTROL-POINT",            \
  146.   /* 0x1D */            "INTERNED-SYMBOL",            \
  147.   /* 0x1E */            "CHARACTER-STRING",            \
  148.   /* 0x1F */            "ACCESS",                \
  149.   /* 0x20 */            "HUNK3-A",                \
  150.   /* 0x21 */            "DEFINITION",                \
  151.   /* 0x22 */            "BROKEN-HEART",                \
  152.   /* 0x23 */            "ASSIGNMENT",                \
  153.   /* 0x24 */            "HUNK3-B",                \
  154.   /* 0x25 */            "IN-PACKAGE",                \
  155.   /* 0x26 */            "COMBINATION",                \
  156.   /* 0x27 */            "MANIFEST-NM-VECTOR",            \
  157.   /* 0x28 */            "COMPILED-ENTRY",            \
  158.   /* 0x29 */            "LEXPR",                \
  159.   /* 0x2A */              "PCOMB3",                \
  160.   /* 0x2B */            "MANIFEST-SPECIAL-NM-VECTOR",        \
  161.   /* 0x2C */            "VARIABLE",                \
  162.   /* 0x2D */            "THE-ENVIRONMENT",            \
  163.   /* 0x2E */            "FUTURE",                \
  164.   /* 0x2F */            "VECTOR-1B",                \
  165.   /* 0x30 */            "PCOMB0",                \
  166.   /* 0x31 */            "VECTOR-16B",                \
  167.   /* 0x32 */            "REFERENCE-TRAP",            \
  168.   /* 0x33 */            "SEQUENCE-3",                \
  169.   /* 0x34 */            "CONDITIONAL",                \
  170.   /* 0x35 */            "DISJUNCTION",                \
  171.   /* 0x36 */            "CELL",                    \
  172.   /* 0x37 */            "WEAK-CONS",                \
  173.   /* 0x38 */            "QUAD",                    \
  174.   /* 0x39 */            "LINKAGE-SECTION",            \
  175.   /* 0x3A */            "RATNUM",                \
  176.   /* 0x3B */            "STACK-ENVIRONMENT",            \
  177.   /* 0x3C */            "COMPLEX",                \
  178.   /* 0x3D */            "COMPILED-CODE-BLOCK"            \
  179.   }
  180.  
  181. /* Flags and aliases */
  182.  
  183. /* Type code 0x10 (used to be TC_PRIMITIVE_EXTERNAL) has been reused. */
  184.  
  185. #define PRIMITIVE_EXTERNAL_REUSED
  186.  
  187. /* Aliases */
  188.  
  189. #define TC_FALSE                TC_NULL
  190. #define TC_MANIFEST_VECTOR        TC_NULL
  191. #define GLOBAL_ENV            TC_NULL
  192. #define TC_BIT_STRING            TC_VECTOR_1B
  193. #define TC_VECTOR_8B            TC_CHARACTER_STRING
  194. #define TC_HUNK3            TC_HUNK3_B
  195.  
  196. #define UNMARKED_HISTORY_TYPE        TC_HUNK3_A
  197. #define MARKED_HISTORY_TYPE        TC_HUNK3_B
  198.